package org.argetr.resim.proc.math;

import java.awt.image.renderable.ParameterBlock;

import javax.media.jai.JAI;
import javax.media.jai.PlanarImage;
import javax.media.jai.operator.DFTDescriptor;

import org.argetr.resim.proc.data.Data;
import org.argetr.resim.proc.data.ImageDA;


public class IDFTPR extends MathPR {

	public Data process() {
		PlanarImage im = getInputAsPlanarImage();
		ParameterBlock pb = new ParameterBlock();
		pb.addSource(im);
		pb.add(DFTDescriptor.SCALING_DIMENSIONS);
		pb.add(DFTDescriptor.COMPLEX_TO_REAL);
		PlanarImage out = JAI.create("idft", pb, null);
		setOutput(new ImageDA(out));
		return getOutput();
	}

}